//
//  SingleTableView.h
//  Muses
//
//  Created by hzyd-wlj on 14/11/11.
//  Copyright (c) 2014年 yodo. All rights reserved.
//


#import <UIKit/UIKit.h>
@class SingleTableView;
@class SortModel;

extern NSString *const TableViewWillShowNotification;

/**
 *  数据类型
 */
typedef NS_ENUM(NSInteger, SingleTableViewDataType){
    /**
     *  字符串
     */
    SingleTableViewDataTypeString,
    /**
     *  AgeSection对象
     */
    SingleTableViewDataTypeAgeSection,
    /**
     *  SortModel对象
     */
    SingleTableViewDataTypeSortModel
};


@protocol SingleTableViewDelegate <NSObject>

- (void)singleTableView:(SingleTableView *)tableView didSelectedCellAtIndexPath:(NSIndexPath *)indexPath;

-(void)cancleTabelView;

@end

@interface SingleTableView : UIViewController
@property (assign, readonly, nonatomic) BOOL isOpen;
@property (assign, readonly, nonatomic) BOOL isAnimating;

@property (copy, readwrite, nonatomic) void (^closeCompletionHandler)(void);
@property (strong, nonatomic) UIImageView *arrawImageView;
@property (weak, nonatomic) id<SingleTableViewDelegate> delegate;

@property (strong, nonatomic) NSArray *dataArray;

- (void)showFromPosition:(CGPoint)position inViewController:(UIViewController *)viewController dataType:(SingleTableViewDataType)dataType;
- (void)closeWithCompletion:(void (^)(void))completion withAnimated:(BOOL)isAnimated;
@end
